import {NgModule} from '@angular/core';
import {HttpClientModule} from "@angular/common/http";
import {BrowserModule} from '@angular/platform-browser';
import {RouterModule} from '@angular/router';
import {ReactiveFormsModule} from '@angular/forms';

import {AppComponent} from './app.component';
import {TopBarComponent} from './top-bar/top-bar.component';
import {ProductListComponent} from './product-list/product-list.component';
import {ProductAlertsComponent} from './product-alerts/product-alerts.component';
import {ProductDetailsComponent} from "./product-details/product-details.component";
import { CarComponent } from './car/car.component';
import { ShippingComponent } from './shipping/shipping.component';
import { FormComponent } from './form/form.component';

@NgModule({
  imports: [
    BrowserModule,
    HttpClientModule,
    ReactiveFormsModule,
    RouterModule.forRoot([
      {path:'form',component:FormComponent},
      {path: '', component: ProductListComponent},
      {path: 'products/:productId', component: ProductDetailsComponent },
      {path:'cart',component:CarComponent},
      {path:'shipping',component:ShippingComponent}
    ])
  ],
  declarations: [
    AppComponent,
    TopBarComponent,
    ProductListComponent,
    ProductAlertsComponent,
    ProductDetailsComponent,
    CarComponent,
    ShippingComponent,
    FormComponent
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule {
}


/*
Copyright Google LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at https://angular.io/license
*/
